<?php 
ob_start();
session_start();


require_once 'libraries/config.php';
require_once 'libraries/database.php';
if(isset($_SESSION['lang'])) {
	$lang = $_SESSION['lang'];	 
	require_once 'langs/'.$lang.'.php';
} else 
	require_once 'langs/English.php';
$db = new database();
$config = array();
$config['title'] = $db->select_function_config("home_title");
$config['footer'] = $db->select_function_config("footer_text");
$config['phone'] = $db->select_function_config("phone");
$config['mail'] = $db->select_function_config("mail");
$config['logo'] = $db->select_function_config("logo");
// products

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title><?php echo $lang['1'];?></title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <link href="css/prettyPhoto.css" rel="stylesheet">
    <link href="css/price-range.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
	<link href="css/responsive.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <link href="css/ict2.css" rel="stylesheet">
    
 
    <script type="text/javascript" src="js/configure.js"></script>
    <link rel="stylesheet" type="text/css" href="css/sweetalert.css">
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->       
    <link rel="shortcut icon" href="images/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="images/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="images/ico/apple-touch-icon-57-precomposed.png">
</head><!--/head-->

<body>
<header id="header"><!--header-->
		<div class="header_top"><!--header_top-->
			<div class="container">
				<div class="row">
					<div class="col-sm-6">
						<div class="contactinfo">
							<ul class="nav nav-pills">
								<li><a href="#"><i class="fa fa-phone"></i><?php echo $config['phone'];?></a></li>
								<li><a href="#"><i class="fa fa-envelope"></i> <?php echo $config['mail'];?></a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div><!--/header_top-->
		
		<div class="header-middle"><!--header-middle-->
			<div class="container">
				<div class="row">
					<div class="col-sm-4">
						<div class="logo pull-left">
							<a href="main.html"><img width="150px"  src="images/<?php echo $config['logo']?>" alt="<?php echo $config['title']?>"/></a>
						</div>
						<div class="btn-group pull-right">
							<div class="btn-group"> 
								<button id="lang" type="button" class="btn btn-default dropdown-toggle usa" data-toggle="dropdown">
									<?=(isset($_SESSION['lang'])?$_SESSION['lang']:"English")?>
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li onclick="return lang1('English');"><a href="javascript:">English</a></li>
									<li onclick="return lang1('China');"><a href="javascript:">China</a></li>
								</ul>
								
							</div>
							
							<div class="btn-group">
								<button type="button" class="btn btn-default dropdown-toggle usa" data-toggle="dropdown">
									<span><?php echo $lang['4'];?></span>
                                    <strong id="dollar"><?=(isset($_SESSION['dollar'])?$_SESSION['dollar']:"USD")?></strong>
									<span class="caret"></span>
								</button>
								<ul class="dropdown-menu">
									<li onclick="return dollar('USD')"><a href="javascript:">US Dollar</a></li>
									<li onclick="return dollar('SGD')"><a href="javascript:">SG Dollar</a></li>
								</ul>
							</div>
						</div>
					</div>
					<div class="col-sm-8">
						<div class="shop-menu pull-right">
							<ul class="nav navbar-nav">
								<li><a href="#"><i class="fa fa-user"></i><?php echo $lang['11'];?></a></li>
								<li><a href="#"><i class="fa fa-star"></i><?php echo $lang['12'];?></a></li>
								<li><a href="#"><i class="fa fa-crosshairs"></i><?php echo $lang['13'];?></a></li>
								<li><a href="#"><i class="fa fa-shopping-cart"></i><?php echo $lang['14'];?></a></li>
								<li><a href="#"><i class="fa fa-lock"></i><?php echo $lang['15'];?></a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div><!--/header-middle-->
	
		<div class="header-bottom"><!--header-bottom-->
			<div class="container">
				<div class="row">
					<div class="col-sm-9">
						<div class="navbar-header">
							<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
								<span class="sr-only">Toggle navigation</span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
							</button>
						</div>
						<div class="mainmenu pull-left">
							<ul class="nav navbar-nav collapse navbar-collapse">
								<li class="dropdown">
                                	<a href="hometheater.html"><?php echo $lang['2'];?><i class="fa fa-angle-down"></i></a>
                                </li>
                                <li class="dropdown">
                                	<a href="sport.html"><?php echo $lang['3'];?><i class="fa fa-angle-down"></i></a>
                               	</li> 
						</div>
					</div>
					<div class="col-sm-3">
						<div class="search_box pull-right">
							<input type="text" placeholder="Search"/>
						</div>
					</div>
				</div>
				
				
			</div>
			
		</div><!--/header-bottom-->
	</header><!--/header-->